<%@page import="study.itwill.team5.admin.AdminItem"%>
<%@page import="study.itwill.jsp.WebHandler"%>
<%@page import="study.itwill.team5.board.BoardCategory"%>
<%@page import="study.itwill.common.PatternChecker"%>
<%@page import="study.itwill.common.DBHandler"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page trimDirectiveWhitespaces="true"%>
<%@ include file="../session.jsp"%>
<%@ include file="../dbcon.jsp"%>
<%
	PatternChecker checker = PatternChecker.getInstance();
	
	// 모든 파라미터 받기
	String category_name = web.getValue("category_name");
	
	if (!checker.isValue(category_name)) {
		db.disconnect();
		web.goPage(null, "파라미터가 잘못되었습니다.");
		return;
	}
%>
<%
	/** 데이터 저장 */
	BoardCategory category = new BoardCategory();
	int seq = category.addBoardCategory(category_name);
	
	/** 접속 해제 */
	db.disconnect();
	
	// 페이지 강제 이동 (JSP)
	web.goPage("viewBoardCategory.jsp?seq=" + seq, null);
%>